package freemarker.core;

import freemarker.template.TemplateException;
import freemarker.template.TemplateMethodModelEx;
import freemarker.template.TemplateModel;

import java.util.List;

/**
 * 只有freemarker.core包才能继承BuiltIn!
 * Created by ycoe on 16/5/9.
 */
public abstract class BasePipeWithParams extends BasePipe {
    @Override
    protected TemplateModel render(Environment env) throws TemplateException {
        return (TemplateMethodModelEx) arguments -> exec(env, arguments);
    }

    protected abstract TemplateModel exec(Environment env, List arguments);
}
